#ifndef _COMM__h
#define _COMM__h

#include "mongoose.h"
#include "cJSON.h"
#include <sys/time.h>

struct file_writer_data
{
  FILE *fp;
  size_t bytes_written;
};


typedef struct
{
  const char *type;
  const char *url;
  char *(*fmethod)(struct http_message *hm);
  int need_auth;
} mg_route_t;

typedef struct
{
  const char *url;
  void (*fupload)(struct mg_connection *nc, int ev, void *p);
} mg_upload_t;


extern struct mg_connection *nc;

#endif